﻿@{
    ViewBag.Title = "ActionManager";
    Layout = "~/Views/Shared/SettingMaster.cshtml";
}
@model Vote.Web.Models.ActionListViewModel
<style type="text/css">
    table td .edit {
        margin-right: 4%;
    }

    table td .view {
        margin-left: 4%;
    }
</style>
<script src="~/ResStatic/JS/actionmanager.js" type="text/javascript"></script>
<script type="text/javascript"> var pageIndex = @ViewBag.pageIndex;var pageItemCount = @ViewBag.pageItemCount; </script>
<ul class="breadcrumb">
    <li><a href="index.html">菜单</a> <span class="divider">/</span></li>
    <li class="active">活动管理</li>
</ul>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="btn-toolbar">
            <button id="addaction" class="btn btn-primary"><i class="icon-plus"></i> 新建投票 </button>
            <div class="btn-group">
            </div>
        </div>
        <div class="well">
            <table class="table">
                <thead>
                    <tr>
                        <th>编号</th>
                        <th>活动名称</th>
                        <th>推送URL</th>
                        <th>创建时间</th>
                        <th>结束时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    @{
                        foreach (var item in Model)
                        {
                            <tr>
                                <td>@item.Id</td>
                                <td>@item.Actionname</td>
                                <td>http://vote.mymc2.com:8000/?id=@item.Id</td>
                                <td>@item.CreateTime.ToString("yyyy-MM-dd")</td>
                                <td title="@item.Endtime">@item.Endtime.ToString("yyyy-MM-dd")</td>
                                <td>
                                    <input type="hidden" class="VoteCount" value="@item.VoteCount" />
                                    <input type="hidden" class="Id" value="@item.Id" />
                                    <a class="edit" href="javascript:void(0);">编辑</a>
                                    <a class="delete" href="javascript:void(0);">删除</a>
                                    <a class="view" href="/Setting/ActionDetails/@item.Id?a=view">查看</a>
                                </td>
                            </tr>
                        }
                    }
                </tbody>
            </table>
        </div>
        <div class="pagination">
            <ul>
                <li><a href="javascript:void(0);" id="prePage">上一页</a></li>
                <li><a href="javascript:void(0);" id="nexPage">下一页</a></li>
            </ul>
        </div>
        <div class="modal small hide fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h3 id="myModalLabel">Delete Confirmation</h3>
            </div>
            <div class="modal-body">
                <p class="error-text"><i class="icon-warning-sign modal-icon"></i>Are you sure you want to delete the user?</p>
            </div>
            <div class="modal-footer">
                <button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
                <button class="btn btn-danger" data-dismiss="modal">Delete</button>
            </div>
        </div>
    </div>
</div>
